package com.own.component.util.sensitive.model;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * TrieNode
 *
 * @author chenxueli
 * @date 2023-05-24 21:03:00
 */
public class TrieNode implements Serializable {

    /**
     * 子节点映射表
     */
    @Getter
    private final Map<Character, TrieNode> children;

    /**
     * 是否是敏感词的结尾字符
     */
    @Getter
    @Setter
    private boolean end;

    public TrieNode() {
        children = new HashMap<>();
        end = false;
    }

}
